#pragma once
#include <boost/asio.hpp>
#include <map>
#include "Session.h"
class Server
{
public:
	Server(boost::asio::io_context& ioc,short port);
	void ClearSession(std::string uuid);
	void StartAccept();
	void HandleAccept(std::shared_ptr<Session> session,const boost::system::error_code & e);
private:
	boost::asio::io_context& _ioc;
	short _port;
	boost::asio::ip::tcp::acceptor _acceptor;
	std::map<std::string, std::shared_ptr<Session>> _sessions;
};

